Skip to content

Instantly share code, notes, and snippets.

@andrewhl
Created May 24, 2014 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewhl/e7b3d546abb7d53d92ef to your computer and use it in GitHub Desktop.
Save andrewhl/e7b3d546abb7d53d92ef to your computer and use it in GitHub Desktop.
...
"require": {
"laravel/framework": "4.1.*"
},
...
"require-dev": {
"way/generators": "2.*",
"phpunit/phpunit": "4.*"
}
...
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
<?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());
}
}
source 'https://rubygems.org'
ruby '2.0.0'
gem 'guard', '~> 2.6.1'
gem 'guard-phpunit2', '~> 0.2.7'
guard 'phpunit2', :cli => '--colors', :tests_path => 'app/tests' do
watch(%r{^.+Test\.php$})
end
<?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>
<?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