Вход Регистрация
Файл: gapps/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php
Строк: 57
<?php
namespace HamcrestText;

class 
IsEqualIgnoringCaseTest extends HamcrestAbstractMatcherTest
{

    protected function 
createMatcher()
    {
        return 
HamcrestTextIsEqualIgnoringCase::equalToIgnoringCase('irrelevant');
    }

    public function 
testIgnoresCaseOfCharsInString()
    {
        
assertThat('HELLO'equalToIgnoringCase('heLLo'));
        
assertThat('hello'equalToIgnoringCase('heLLo'));
        
assertThat('HelLo'equalToIgnoringCase('heLLo'));

        
assertThat('bye'not(equalToIgnoringCase('heLLo')));
    }

    public function 
testFailsIfAdditionalWhitespaceIsPresent()
    {
        
assertThat('heLLo 'not(equalToIgnoringCase('heLLo')));
        
assertThat(' heLLo'not(equalToIgnoringCase('heLLo')));
        
assertThat('hello'not(equalToIgnoringCase(' heLLo')));
    }

    public function 
testFailsIfMatchingAgainstNull()
    {
        
assertThat(nullnot(equalToIgnoringCase('heLLo')));
    }

    public function 
testDescribesItselfAsCaseInsensitive()
    {
        
$this->assertDescription(
            
'equalToIgnoringCase("heLLo")',
            
equalToIgnoringCase('heLLo')
        );
    }
}
Онлайн: 1
Реклама