Created
May 24, 2014 20:21
-
-
Save andrewhl/e7b3d546abb7d53d92ef to your computer and use it in GitHub Desktop.
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
... | |
"require": { | |
"laravel/framework": "4.1.*" | |
}, | |
... | |
"require-dev": { | |
"way/generators": "2.*", | |
"phpunit/phpunit": "4.*" | |
} | |
... |
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
22:13:31 - INFO - Guard is using TerminalTitle to send notifications. | |
22:13:32 - INFO - Running all tests | |
PHP Strict Standards: Declaration of PHPUnit_Extensions_Progress_ResultPrinter::printDefects() should be compatible with PHPUnit_TextUI_ResultPrinter::printDefects(array $defects, $type) in /Users/andrew/.rvm/gems/ruby-2.0.0-p195/gems/guard-phpunit2-0.2.7/lib/guard/phpunit/formatters/PHPUnit-Progress/PHPUnit/Extensions/Progress/ResultPrinter.php on line 14 | |
Strict Standards: Declaration of PHPUnit_Extensions_Progress_ResultPrinter::printDefects() should be compatible with PHPUnit_TextUI_ResultPrinter::printDefects(array $defects, $type) in /Users/andrew/.rvm/gems/ruby-2.0.0-p195/gems/guard-phpunit2-0.2.7/lib/guard/phpunit/formatters/PHPUnit-Progress/PHPUnit/Extensions/Progress/ResultPrinter.php on line 14 | |
.F | |
Failures: | |
1) PracticeTest::testHelloWorld | |
Failed asserting that two strings are equal. | |
--- Expected | |
+++ Actual | |
@@ @@ | |
-'Hello world' | |
+'Hello worlds' | |
# /project/app/tests/PracticeTest.php:13 | |
# phar:///usr/local/Cellar/phpunit/4.0.7/libexec/phpunit-4.0.7.phar/phpunit/TextUI/Command.php:179 | |
# phar:///usr/local/Cellar/phpunit/4.0.7/libexec/phpunit-4.0.7.phar/phpunit/TextUI/Command.php:132 | |
Finished in 83 ms | |
2 tests, 2 assertions, 1 failures |
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 ExampleTest extends TestCase { | |
/** | |
* A basic functional test example. | |
* | |
* @return void | |
*/ | |
public function testBasicExample() | |
{ | |
$crawler = $this->client->request('GET', '/'); | |
$this->assertTrue($this->client->getResponse()->isOk()); | |
} | |
} |
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
source 'https://rubygems.org' | |
ruby '2.0.0' | |
gem 'guard', '~> 2.6.1' | |
gem 'guard-phpunit2', '~> 0.2.7' |
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
guard 'phpunit2', :cli => '--colors', :tests_path => 'app/tests' do | |
watch(%r{^.+Test\.php$}) | |
end |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<phpunit backupGlobals="false" | |
backupStaticAttributes="false" | |
bootstrap="bootstrap/autoload.php" | |
colors="true" | |
convertErrorsToExceptions="true" | |
convertNoticesToExceptions="true" | |
convertWarningsToExceptions="true" | |
processIsolation="false" | |
stopOnFailure="false" | |
syntaxCheck="false" | |
> | |
<testsuites> | |
<testsuite name="Application Test Suite"> | |
<directory>./app/tests/</directory> | |
</testsuite> | |
</testsuites> | |
</phpunit> |
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 | |
/** | |
* Practice Test | |
*/ | |
class PracticeTest extends PHPUnit_Framework_Testcase | |
{ | |
public function testHelloWorld() | |
{ | |
$greeting = "Hello world"; | |
$this->assertEquals($greeting, 'Hello worlds'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment