yii\test\FixtureTrait::getFixture PHP Méthode

getFixture() public méthode

Returns the named fixture.
public getFixture ( string $name ) : Fixture
$name string the fixture name. This can be either the fixture alias name, or the class name if the alias is not used.
Résultat Fixture the fixture object, or null if the named fixture does not exist.
    public function getFixture($name)
    {
        if ($this->_fixtures === null) {
            $this->_fixtures = $this->createFixtures(array_merge($this->globalFixtures(), $this->fixtures()));
        }
        $name = ltrim($name, '\\');
        return isset($this->_fixtures[$name]) ? $this->_fixtures[$name] : null;
    }