Skip to content

Commit

Permalink
Introduce the use of nikic/php-parser to generate the phpunit test cl…
Browse files Browse the repository at this point in the history
…ass.
  • Loading branch information
jwage committed Dec 14, 2018
1 parent 27bfa1f commit 8099d59
Show file tree
Hide file tree
Showing 17 changed files with 1,103 additions and 405 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace App\Services;

class Dependency
{
public function getSomething()
public function getSomething() : null
{
return null;
}
Expand Down Expand Up @@ -99,12 +99,12 @@ class MyServiceTest extends TestCase

public function testGetDependency() : void
{
$this->myService->getDependency();
self::assertInstanceOf(Dependency::class, $this->myService->getDependency());
}

public function testGetValue() : void
{
$this->myService->getValue();
self::assertSame(1, $this->myService->getValue());
}

protected function setUp() : void
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
"require": {
"php": "^7.1",
"doctrine/inflector": "2.0.x-dev",
"twig/twig": "^2.5",
"symfony/console": "^4.1"
"nikic/php-parser": "^4.1",
"symfony/console": "^4.1",
"symfony/filesystem": "^4.2"
},
"require-dev": {
"doctrine/coding-standard": "^5.0",
Expand Down
Loading

0 comments on commit 8099d59

Please sign in to comment.