This file contains 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/sh | |
if [ -f ./bin/phpspec ] | |
then | |
./bin/phpspec run --quiet | |
if [ $? -ne 0 ] | |
then | |
echo "PHPSpec has failed - commit aborted" | |
return 1 | |
fi |
This file contains 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
VAGRANTFILE_API_VERSION = "2" | |
digital_ocean_client_id = '' | |
digital_ocean_api_key = '' | |
Vagrant.require_plugin "vagrant-librarian-chef" | |
Vagrant.require_plugin "vagrant-omnibus" | |
Vagrant.require_plugin "vagrant-vbguest" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| |
This file contains 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 Dcwroc\TaskBundle\Entity; | |
class Task | |
{ | |
private $name; | |
private $dueDate; | |
private $completed = false; |
This file contains 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 Dcwroc\TaskBundle\Entity; | |
use Symfony\Component\Validator\Constraints as Assert; | |
class Task | |
{ | |
/** | |
* @Assert\NotBlank() |
This file contains 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 Dcwroc\TaskBundle\InMemory; | |
use Dcwroc\TaskBundle\Entity\Task; | |
use Dcwroc\TaskBundle\Entity\TaskRepository; | |
class InMemoryTaskRepository implements TaskRepository | |
{ | |
/** |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am cakper on github. | |
* I am cakper (https://keybase.io/cakper) on keybase. | |
* I have a public key whose fingerprint is E49A 7AB1 A55F 7052 DA92 89B2 363A FBB6 6B77 9714 | |
To claim this, I am signing this object: |
This file contains 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
class Statistics { | |
let minimum: Int | |
let maximum: Int | |
let average: Int | |
init(minimum: Int, maximum: Int, average: Int) { | |
self.minimum = minimum | |
self.maximum = maximum | |
self.average = average | |
} |
This file contains 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 | |
class ListElement | |
{ | |
/** | |
* @var ListElement | |
*/ | |
private $next; | |
private $value; |
This file contains 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 | |
require_once dirname(__DIR__).'/../../../../app/AppKernel.php'; | |
/** | |
* Test case class helpful with Entity tests requiring the database interaction. | |
* For regular entity tests it's better to extend standard \PHPUnit_Framework_TestCase instead. | |
*/ | |
abstract class KernelAwareTest extends \PHPUnit_Framework_TestCase | |
{ |
This file contains 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
public function testThatCreateAndUpdateDatesAreRegisteredAndIdGenerated() | |
{ | |
$this->prepareEntityManager(); | |
$now = new \DateTime('now'); | |
$moneyTransaction = $this->moneyTransaction; | |
$validator = $this->validator; | |
$recipient = new \Jazzy\UserBundle\Entity\User(); |
OlderNewer