Skip to content

Instantly share code, notes, and snippets.

@sebastiaanluca
Last active May 18, 2017 09:22
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 sebastiaanluca/cb8d8bd9ab9687c90d91826f427704e0 to your computer and use it in GitHub Desktop.
Save sebastiaanluca/cb8d8bd9ab9687c90d91826f427704e0 to your computer and use it in GitHub Desktop.

Composer.json:

"phpunit/phpunit": "^6",

PHPUnit

Test extends PHPUnit's TestCase which extends the Assert class.

<?php
namespace Tests;
use PHPUnit\Framework\TestCase;
class MyTest extends TestCase
{
public function test_it_does_something()
{
// Every one of these should provide code completion,
// but show "not found" warnings. When running this in
// my test suite, all work as expected.
static::assertEquals(true, true);
self::assertEquals(true, true);
$this->assertEquals(true, true);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment