Esempio n. 1
0
 public function testFromXml()
 {
     $config = ToolConfiguration::createFromXml($this->testXml);
     $this->assertEquals('Test Config', $config->getTitle());
     $this->assertEquals('Description of boringness', $config->getDescription());
     $this->assertEquals('http://www.example.com/lti', $config->getLaunchUrl());
     $this->assertEquals('test.tool', $config->getVendorName());
     $this->assertEquals('test', $config->getVendorCode());
     $this->assertEquals('We test things', $config->getVendorDescription());
     $this->assertEquals('http://www.example.com/about', $config->getVendorUrl());
     $this->assertEquals('Joe Support', $config->getVendorContactEmail());
     $this->assertEquals('*****@*****.**', $config->getVendorContactName());
     //@TODO: test the rest
 }
Esempio n. 2
0
 private function hasRequiredParams()
 {
     return $this->consumerKey && $this->consumerSecret && $this->toolConfiguration->getLaunchUrl() && array_key_exists(LaunchParameters::RESOURCE_LINK_ID, $this->parameters);
 }