/** * Test image button object * * @return void */ public function testNewFeefoObject() { $feefo = new aw\feefo\Feefo('www.feefouserdomain.com', 'feefopassword'); // Accessor unit tests // Website $this->assertEquals('www.feefouserdomain.com', $feefo->getLogon()); // Password $this->assertEquals('feefopassword', $feefo->getPassword()); // Set the other accessors $accessors = array('name' => 'customer name', 'orderRef' => 'orderReference', 'email' => '*****@*****.**', 'description' => 'This is a description of the customers order', 'category' => 'Feefo Category', 'serviceRating' => '+', 'serviceComment' => 'This is a comment that the customer has supplied about the service', 'productRating' => '+', 'productComment' => 'This is a comment that the customer has supplied about the product'); foreach ($accessors as $accessor => $value) { $property = ucfirst($accessor); $setter = 'set' . $property; $getter = 'get' . $property; $feefo->{$setter}($value); $this->assertEquals($value, $feefo->{$getter}()); } // Test the submission url $this->assertEquals('http://www.feefo.com/feefo/entersaleremotely.jsp?logon=www.feefouserdomain.com&password=feefopassword&email=email%40emailaddress.com&name=customer+name&description=This+is+a+description+of+the+customers+order&orderref=orderReference&servicecomment=This+is+a+comment+that+the+customer+has+supplied+about+the+service&productcomment=This+is+a+comment+that+the+customer+has+supplied+about+the+product&category=Feefo+Category', $feefo->getCommentUrl()); }