Object: $result ($this)
Expectation: should or shouldNot
Matcher: Be...()
Types of Matchers:
| #!/bin/bash | |
| docker stop $(docker ps -a -q) | |
| docker rm $(docker ps -a -q) | |
| docker rmi $(docker images -a -q) |
| Server { | |
| Port = 80 | |
| SourceRoot = /var/www/public/ | |
| } | |
| VirtualHost { | |
| * { | |
| Pattern = .* | |
| RewriteRules { | |
| * { |
| // Taken from: https://laracasts.com/forum/88-how-do-you-handle-enums | |
| class OrderStatus implements Enum | |
| { | |
| const FRAUD = -2; | |
| const CANCELLED = -1; | |
| const UNPAID = 0; | |
| const RECEIVED = 1; | |
| const PARTIALLY_SHIPPED = 10; | |
| const SHIPPED = 20; |
| /* Generate unique values with the UUID() function. */ | |
| UPDATE table SET column = UUID(); | |
| /* Optionally strip the hyphens from the values. */ | |
| UPDATE table SET column = REPLACE(UUID(), '-', ''); |
| <?php | |
| class Collection { | |
| protected $collection; | |
| public function add($item) | |
| { | |
| if (is_array($item)) | |
| { |
| # Fix encoding error with Jekyll | |
| export LC_ALL=en_US.UTF-8 | |
| export LANG=en_US.UTF-8 | |
| # Fix Ruby Gems path | |
| if which ruby >/dev/null && which gem >/dev/null; then | |
| PATH="$(ruby -rubygems -e 'puts Gem.user_dir')/bin:$PATH" | |
| fi |
| <?php | |
| $checked = []; | |
| $unchecked = []; | |
| foreach($input as $id => $enabled) | |
| { | |
| if ($enabled) $checked[] = $id; | |
| else $unchecked[] = $id; | |
| } |
| <?php | |
| // Inside some class... | |
| $names = ['Event', 'Exception', 'Routing']; | |
| foreach ($names as $name) | |
| { | |
| $this->{"method{$name}"}(); | |
| } |
O Forge é um projeto pessoal do Taylor, resultado de 9 meses de trabalho. O plano inicial era lançá-lo em Dezembro de 2013, próximo do lançamento da versão 4.1 do Laravel.
Desenvolver o Forge levou mais tempo do que a versão inicial do Laravel, que levou 3 meses — se não me engano. O Taylor achava que apenas ele usaria o Laravel.
Ele gastou cerca de 18h por semana, às vezes menos. 2h por noite + 4h extras no final de semana. Sua esposa dorme por volta das 22h e ele trabalha até meia-noite. Geralmente ele dorme até 7:45h. Ele disse que precisa de pelo menos 7h de sono para render bem.
O change log da versão 4.1 do Laravel é [4x ma