Skip to content

Commit

Permalink
Style Patch
Browse files Browse the repository at this point in the history
  • Loading branch information
zakhenry committed Sep 19, 2015
1 parent c32688a commit ffda549
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 1 addition & 3 deletions api/tests/Traits/AssertionsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,19 @@
*
* For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
*/
use Illuminate\Support\Debug\Dumper;
use Laravel\Lumen\Testing\AssertionsTrait as BaseAssertionsTrait;
use Symfony\Component\VarDumper\Cloner\VarCloner;
use Symfony\Component\VarDumper\Dumper\CliDumper;


/**
* Additional assertions not offered by Lumen's TestCase or PHPUnit.
*/
trait AssertionsTrait
{

use BaseAssertionsTrait {
BaseAssertionsTrait::assertResponseStatus as baseAssertResponseStatus;
}

/**
* Assert the response is a JSON array.
*
Expand Down
8 changes: 3 additions & 5 deletions api/tests/Traits/AssertionsTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/
class AssertionsTraitTest extends TestCase
{

/**
* Test that date formats are valid.
*/
Expand Down Expand Up @@ -46,7 +45,7 @@ public function testValidISO8601DateInvalidDateTimeString()
}

/**
* Test that the response status assertion outputs the dumped json response on failure
* Test that the response status assertion outputs the dumped json response on failure.
*/
public function testFailingStatusCodeAssertion()
{
Expand All @@ -55,12 +54,11 @@ public function testFailingStatusCodeAssertion()
ob_start();
try {
$this->assertResponseStatus(200);
} catch (\Exception $e){
} catch (\Exception $e) {
$this->assertInstanceOf('PHPUnit_Framework_AssertionFailedError', $e);
}
$output = ob_get_clean();

$this->assertContains("NotFoundHttpException", $output);
$this->assertContains('NotFoundHttpException', $output);
}

}

0 comments on commit ffda549

Please sign in to comment.