/** * @covers \KJSencha\Direct\Remoting\Api\Factory\ApiBuilder::buildMethod */ public function testMethodIgnoresConstructor() { /* @var $action \KJSencha\Direct\Remoting\Api\Object\Action */ $action = $this->apiBuilder->buildAction('KJSenchaTestAsset\\FooService'); $this->assertTrue($action->hasMethod('getBar')); $this->assertFalse($action->hasMethod('__construct')); }
/** * @covers KJSencha\Annotation\Formhandler::decorateObject */ public function testServiceAnnotationDoesNotDecorateOthers() { /* @var $api \KJSencha\Direct\Remoting\Api\Api */ $api = $this->apiBuilder->buildApi(array('services' => array('Direct.Profile' => 'KJSenchaTestAsset\\Direct\\Form\\Profile'))); /* @var $action \KJSencha\Direct\Remoting\Api\Object\Action */ $action = $api->getAction('Direct.Profile'); $this->assertTrue($action->hasMethod('getBasicInfo')); $this->assertNull($action->getMethod('getBasicInfo')->getOption('formHandler')); }