Skip to content

Commit

Permalink
Remove some complexity caused by refactorings
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Morton committed Feb 13, 2014
1 parent 4ba842f commit 2083f7f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions test/Lily/Test/Usage/DescribeTestingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,15 @@ private function applicationResponse($request)
return $application($request);
}

private function crawler($html)
{
return new Crawler($html);
}

private function filterNotEmpty($crawler, $filter)
private function filterNotEmpty($html, $filter)
{
$crawler = new Crawler($html);
return $crawler->filter($filter)->count() > 0;
}

private function responseBodyHasClass($response, $class)
{
return $this->filterNotEmpty($this->crawler($response['body']), $class);
return $this->filterNotEmpty($response['body'], $class);
}

public function testFormErrorShouldBeShown()
Expand Down

0 comments on commit 2083f7f

Please sign in to comment.