ÿØÿà JFIF ÿþ; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 157.90.209.209 / Your IP : 216.73.216.185 [ Web Server : Apache System : Linux hcomm124.dns-wk.info 4.18.0-553.64.1.el8_10.x86_64 #1 SMP Mon Jul 28 12:01:56 EDT 2025 x86_64 User : evidenciarevista ( 1049) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Domains : 216 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/evidenciarevista/admin/vendor/phpspec/phpspec/spec/PhpSpec/Matcher/ |
Upload File : |
<?php namespace spec\PhpSpec\Matcher; use PhpSpec\ObjectBehavior; use Prophecy\Argument; use PhpSpec\Formatter\Presenter\PresenterInterface; use PhpSpec\Exception\Example\FailureException; class IdentityMatcherSpec extends ObjectBehavior { function let(PresenterInterface $presenter) { $presenter->presentValue(Argument::any())->willReturn('val1', 'val2'); $this->beConstructedWith($presenter); } function it_is_a_matcher() { $this->shouldBeAnInstanceOf('PhpSpec\Matcher\MatcherInterface'); } function it_responds_to_return() { $this->supports('return', '', array(''))->shouldReturn(true); } function it_responds_to_be() { $this->supports('be', '', array(''))->shouldReturn(true); } function it_responds_to_equal() { $this->supports('equal', '', array(''))->shouldReturn(true); } function it_responds_to_beEqualTo() { $this->supports('beEqualTo', '', array(''))->shouldReturn(true); } function it_matches_empty_strings() { $this->shouldNotThrow()->duringPositiveMatch('be', '', array('')); } function it_matches_not_empty_strings() { $this->shouldNotThrow()->duringPositiveMatch('be', 'chuck', array('chuck')); } function it_does_not_match_empty_string_with_emptish_values() { $this->shouldThrow(new FailureException('Expected val1, but got val2.')) ->duringPositiveMatch('be', '', array(false)); } function it_does_not_match_zero_with_emptish_values() { $this->shouldThrow(new FailureException('Expected val1, but got val2.')) ->duringPositiveMatch('be', 0, array(false)); } function it_does_not_match_null_with_emptish_values() { $this->shouldThrow(new FailureException('Expected val1, but got val2.')) ->duringPositiveMatch('be', null, array(false)); } function it_does_not_match_false_with_emptish_values() { $this->shouldThrow(new FailureException('Expected val1, but got val2.')) ->duringPositiveMatch('be', false, array('')); } function it_does_not_match_non_empty_different_value() { $this->shouldThrow(new FailureException('Expected val1, but got val2.')) ->duringPositiveMatch('be', 'one', array('two')); } function it_mismatches_empty_string() { $this->shouldThrow(new FailureException('Did not expect val1, but got one.')) ->duringNegativeMatch('be', '', array('')); } function it_mismatches_not_empty_string($matcher) { $this->shouldThrow(new FailureException('Did not expect val1, but got one.')) ->duringNegativeMatch('be', 'chuck', array('chuck')); } function it_mismatches_empty_string_with_emptish_values() { $this->shouldNotThrow()->duringNegativeMatch('be', '', array(false)); } function it_mismatches_zero_with_emptish_values_using_identity_operator() { $this->shouldNotThrow()->duringNegativeMatch('be', 0, array(false)); } function it_mismatches_null_with_emptish_values_using_identity_operator() { $this->shouldNotThrow()->duringNegativeMatch('be', null, array(false)); } function it_mismatches_false_with_emptish_values_using_identity_operator() { $this->shouldNotThrow()->duringNegativeMatch('be', false, array('')); } function it_mismatches_on_non_empty_different_value() { $this->shouldNotThrow()->duringNegativeMatch('be', 'one', array('two')); } }