/** * @covers \ProxyManager\Generator\ClassGenerator::setImplementedInterfaces */ public function testImplementedInterfacesAreFQCNs() { $desiredFqcns = array('\\Countable'); $interfaceNameInputs = array(array('Countable'), array('\\Countable\\')); foreach ($interfaceNameInputs as $interfaceNames) { $classGenerator = new ClassGenerator(); $classGenerator->setImplementedInterfaces($interfaceNames); $this->assertEquals($desiredFqcns, $classGenerator->getImplementedInterfaces()); } }
/** * @inheritdoc * @return array * @author Vitaliy Stepanyuk <*****@*****.**> */ public function getMethods() { // Skip method that name is PHP keyword return array_filter(parent::getMethods(), function (AbstractMemberGenerator $method) { return !preg_match(self::KEYWORDS_REGEX, $method->getName()); }); }
/** * @test */ public function parsingConfigurationWithoutAnyErrorsSucceeds() { $this->classGenerator->expects(static::any())->method('addMethodFromGenerator'); $reflClass = new \ReflectionClass(BeanConfiguration::class); $this->configGenerator->generate($reflClass, $this->classGenerator); }