Skip to content

Commit

Permalink
updated to fit with style guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Jantho1990 committed Mar 18, 2018
1 parent 27ad8db commit f62cc01
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/Illuminate/Foundation/Testing/Constraints/SeeInOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@

namespace Illuminate\Foundation\Testing\Constraints;

use Illuminate\Database\Connection;
use PHPUnit\Framework\Constraint\Constraint;

class SeeInOrder extends Constraint
{
/**
* The value that failed. Used to display in the error message.
*
*
* @var string
*/
protected $failedValue;

/**
* The string we want to check the content of.
*
*
* @var
*/
protected $content;
Expand Down Expand Up @@ -47,11 +46,13 @@ public function matches($values) : bool

if ($valuePosition === false || $valuePosition < $position) {
$this->failedValue = $value;

return false;
}

$position = $valuePosition + mb_strlen($value);
}

return true;
}

Expand All @@ -78,6 +79,7 @@ public function failureDescription($values) : string
public function toString() : string
{
$class = new ReflectionClass($this);

return $class->name;
}
}
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Testing/TestResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
use Illuminate\Support\Carbon;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Traits\Macroable;
use Illuminate\Foundation\Testing\Constraints\SeeInOrder;
use PHPUnit\Framework\Assert as PHPUnit;
use Illuminate\Foundation\Testing\Constraints\SeeInOrder;

/**
* @mixin \Illuminate\Http\Response
Expand Down
1 change: 0 additions & 1 deletion tests/Foundation/Testing/Constraints/SeeInOrderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Illuminate\Tests\Foundation\Constraints;

use PHPUnit\Framework\TestCase;
use Illuminate\Foundation\Testing\Constraints\SeeInOrder;
use Illuminate\Tests\Foundation\FoundationTestResponseTest;

class SeeInOrderTest extends TestCase
Expand Down

0 comments on commit f62cc01

Please sign in to comment.