feat(pending-higher-order-tests): adds code and tests

This commit is contained in:
Nuno Maduro
2020-06-04 01:33:33 +02:00
parent b0680b7e2c
commit c81dce0f6d
6 changed files with 43 additions and 5 deletions

View File

@ -0,0 +1,29 @@
<?php
use PHPUnit\Framework\TestCase;
uses(Gettable::class);
/**
* @return TestCase|Gettable
*/
function get(string $route)
{
return test()->get($route);
}
trait Gettable
{
/**
* @return TestCase|Gettable
*/
public function get(string $route)
{
assertNotEmpty($route);
return $this;
}
}
get('foo')->get('bar')->assertTrue(true);
get('foo')->assertTrue(true);