Neos\Neos\Tests\Unit\Domain\Service\DomainMatchingStrategyTest::getSortedMatchesReturnsOneGivenDomainIfItMatchesExactly PHP Метод

getSortedMatchesReturnsOneGivenDomainIfItMatchesExactly() публичный Метод

    public function getSortedMatchesReturnsOneGivenDomainIfItMatchesExactly()
    {
        $mockDomains = array($this->getMockBuilder(Domain::class)->disableOriginalConstructor()->getMock());
        $mockDomains[0]->expects($this->any())->method('getHostname')->will($this->returnValue('www.neos.io'));
        $expectedDomains = array($mockDomains[0]);
        $strategy = new DomainMatchingStrategy();
        $actualDomains = $strategy->getSortedMatches('www.neos.io', $mockDomains);
        $this->assertSame($expectedDomains, $actualDomains);
    }