Skip to content

Commit

Permalink
Update AssertTest.php
Browse files Browse the repository at this point in the history
New test to verify stringify() truncates long values appropriately
  • Loading branch information
rquadling committed Nov 11, 2016
1 parent e5f6b6d commit ec53c2d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Assert/Tests/AssertTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1555,6 +1555,15 @@ public function providerValidBetweenExclusive()
array(new \DateTime('today'), new \DateTime('yesterday'), new \DateTime('tomorrow')),
);
}

public function testStringifyTruncatesStringValuesLongerThan100CharactersAppropriately()
{
$string = str_repeat('1234567890', 11);

$this->setExpectedException('Assert\AssertionFailedException', '1234567...', Assertion::INVALID_FLOAT);

$this->assertTrue(Assertion::float($string));
}
}

class ChildStdClass extends \stdClass
Expand Down

0 comments on commit ec53c2d

Please sign in to comment.