Giter VIP home page Giter VIP logo

sfphpunitplugin's People

Contributors

0x46616c6b avatar harking avatar makasim avatar themouette avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sfphpunitplugin's Issues

Selenium doesn't seem to be optional

Hi!
in symfony phpunit:init I get this error :

PHP Warning:  require_once(PHPUnit/Extensions/SeleniumTestCase.php): failed to open stream: No such file or directory in /home/xyz/projects/sshfs/www/2.1/plugins/sfPhpunitPlugin/config/autoload_3.5.php on line 4

PHP Fatal error:  require_once(): Failed opening required 'PHPUnit/Extensions/SeleniumTestCase.php' (include_path='/home/xyz/projects/paasilinna-sshfs/www/2.1/lib/vendor:.:/usr/share/php:/usr/share/pear') in /home/xyz/projects/sshfs/www/2.1/plugins/sfPhpunitPlugin/config/autoload_3.5.php on line 4
´´´
I had to uncomment **require_once 'PHPUnit/Extensions/SeleniumTestCase.php';**  in **autoload_3.5.php**

Clean method doesn't work with Oracle 10g

I wrote some fixtures to use with Doctrine, but when I call the clean method, it shows me this error:
Doctrine_Adapter_Exception: ORA-00922: missing or invalid option : SET FOREIGN_KEY_CHECKS = 0;

It seems that Oracle doesn't support such configuration. I'm trying to figure out a solution for this.

Class 'sfPhpunitDoctrineTestCase' not found

symfony phpunit:create-models -t="doctrine" creates all testcase files as "extends sfPhpunitDoctrineTestCase" but that class is never defined anywhere in the plugin files.

If I change the generated method signature to be:

".... extends sBasefPhpunitTestCase implements sfPhpunitFixtureDoctrineAggregator"

it appears to fix the problem, but I'm not sure if the best way to fix it is this way, or to include the sfPhpunitDoctrineTestCase as an abstract class somewhere in the include path for the tests.

Add some helper methods in sfBasePhpunitAmfTestCase

Hi.

I've added some method to this class. I don't know if you are ok with these methods. I was tired of repeating myself. I have thought before to create a subclass of sfBasePhpunitAmfTestCase but maybe it's better to add them to your class.

I think these methods are explicits but I can send you an example, and a pull request.

diff --git a/plugins/sfPhpunitPlugin/lib/testcase/sfBasePhpunitAmfTestCase.class.php b/plugins/sfPhpunitPlugin/lib/testcase/sfBasePhpunitAmfTestCase.class.php
--- a/plugins/sfPhpunitPlugin/lib/testcase/sfBasePhpunitAmfTestCase.class.php
+++ b/plugins/sfPhpunitPlugin/lib/testcase/sfBasePhpunitAmfTestCase.class.php
@@ -132,4 +132,36 @@

 return new sfPhpunitAmfService($this->_amfservice, $client); 

}
+

  • protected $_amfVoPackage = false;
  • protected $_amfVoClassname = false;
  • protected function getVOClassname()
  • {
  • if ((false == $this->_amfPackage) || (false == $this->_amfVO))
  • {
  •  throw new Exception('Value object package and/or classname not set');
    
  • }
  • return sprint('%s.%s', $this->_amfPackage, $this->_amfVO);
  • }
  • protected function doTestArrayResponse($response = null)
  • {
  • $this->assertNotNull($response, 'Response should not be null');
  • $this->assertInternalType(PHPUnit_Framework_Constraint_IsType::TYPE_ARRAY, $response);
  • $this->assertNotEmpty($response);
  • $this->doTestSingleVoReponse($response[0]);
  • return $response;
  • }
  • public function doTestSingleVoReponse($vo = null)
  • {
  • $this->assertNotNull($vo->getAMFData(), 'Value object should not be null');
  • $this->assertEquals($this->getVOClassname(), $vo->getAMFClassname(), 'Value object is not the correct classname');
  • return $vo;
  • }
    }
    \ No newline at end of file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.