Kraken\_Unit\Runtime\_Case\RuntimeCase::testApiGetCore_CallsModelMethod PHP Метод

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

    public function testApiGetCore_CallsModelMethod()
    {
        $test = $this->getTest();
        $core = $test->getMock(Core::class, [], [], '', false);
        $model = $test->getMock(RuntimeModel::class, [], [], '', false);
        $model->expects($test->once())->method('getCore')->will($test->returnValue($core));
        $runtime = $this->createRuntime();
        $test->setProtectedProperty($runtime, 'model', $model);
        $test->assertSame($core, $runtime->getCore());
    }