This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| trait one { | |
| public $prop; | |
| protected function someMethod() | |
| { | |
| // do something hidden from the | |
| // outside world | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Doctrine\Common\Annotations\AnnotationRegistry; | |
| if (!class_exists('Composer\\Autoload\\ClassLoader', false)) { | |
| $loader = require __DIR__.'/../vendor/autoload.php'; | |
| } else { | |
| $loader = new Composer\Autoload\ClassLoader(); | |
| $loader->register(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace spec\PHPSpec2\Formatter\Representer; | |
| use PHPSpec2\ObjectBehavior; | |
| use PHPSpec2\MethodBehavior; | |
| class BasicRepresenter extends ObjectBehavior | |
| { | |
| function it_should_represent_any_value() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace spec\Bank\Controller; | |
| use PHPSpec2\ObjectBehavior; | |
| use PHPSpec2\Matcher\CustomMatchersProviderInterface; | |
| use PHPSpec2\Matcher\InlineMatcher; | |
| class PaymentController extends ObjectBehavior implements CustomMatchersProviderInterface | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PHP Fatal error: Uncaught exception 'LogicException' with message 'The parent constructor was not called: the object is in an invalid state ' in splfileobject.php:16 | |
| Stack trace: | |
| splfileobject.php(16): SplFileInfo->_bad_state_ex() | |
| #1 {main} | |
| thrown in splfileobject.php on line 16 | |
| Fatal error: Uncaught exception 'LogicException' with message 'The parent constructor was not called: the object is in an invalid state ' in splfileobject.php:16 | |
| Stack trace: | |
| #0 splfileobject.php(16): SplFileInfo->_bad_state_ex() | |
| #1 {main} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Setup and start Sauce Connect for your TravisCI build | |
| # This script requires your .travis.yml to include the following two private env variables: | |
| # SAUCE_USERNAME | |
| # SAUCE_ACCESS_KEY | |
| # Follow the steps at https://saucelabs.com/opensource/travis to set that up. | |
| # | |
| # Curl and run this script as part of your .travis.yml before_script section: | |
| # before_script: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //PHPUnit | |
| public function testApply() { | |
| $mock = $this->getMock('My\Foo\Class', array('apply')); | |
| $mock->expects($this->any()) | |
| ->method('apply') | |
| ->with('foo') | |
| ->will($this->returnValue('bar')); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\EventListener; | |
| use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; | |
| use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; | |
| class ExceptionRethrowListener | |
| { | |
| public function onKernelException(GetResponseForExceptionEvent $event) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| default: | |
| extensions: | |
| custom_extension.php: ~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $keywords = new Behat\Gherkin\Keywords\CachedArrayKeywords('/path/to/gherkin_lib/i18n.php'); | |
| $lexer = new Behat\Gherkin\Lexer($keywords); | |
| $parser = new Behat\Gherkin\Parser($lexer); | |
| $gherkin = new Behat\Gherkin(); | |
| $gherkin->addLoader(new Behat\Gherkin\Loader\DirectoryLoader($gherkin)); | |
| $gherkin->addLoader(new Behat\Gherkin\Loader\GherkinFileLoader($parser)); | |
| $gherkin->setBasePath(__DIR__ . '/features'); |