public function testReferenceWithAnEmptyWsBindingIsInvalid() { try { $instance = new ReferenceWithAnEmptyWsBinding(); $reader = new SCA_AnnotationReader($instance); $references = $reader->reflectReferences(); } catch (SCA_RuntimeException $e) { $this->assertContains("binding", $e->getMessage()); $this->assertContains("no following value", $e->getMessage()); return; } $this->fail(); }
public function testTabsAndSpacesAreOk() { $instance = new TabsAndSpaces(); $reader = new SCA_AnnotationReader($instance); $service_description = $reader->reflectService(); $this->assertTrue(key_exists('spaces', $service_description->operations)); $this->assertTrue(key_exists('tabs', $service_description->operations)); $spaces_op = $service_description->operations['spaces']; $parm = $spaces_op['parameters'][0]; $this->assertEquals(array('annotationType' => '@param', 'nillable' => false, 'description' => 'the ticker symbol', 'name' => 'ticker', 'type' => 'string'), $parm); $tabs_op = $service_description->operations['tabs']; $parm = $tabs_op['parameters'][0]; $this->assertEquals(array('annotationType' => '@param', 'nillable' => false, 'description' => 'the ticker symbol', 'name' => 'ticker', 'type' => 'string'), $parm); $references = $reader->reflectReferences(); $this->assertEquals(array('spaces' => 'spaces.php', 'tabs' => 'tabs.wsdl'), $references); }