| | 49 | $this->assertResponseHasNoRedirect(); |
| | 50 | $this->assertContainerAttributeExists('title'); |
| | 51 | } |
| | 52 | |
| | 53 | public function testResponseJson() |
| | 54 | { |
| | 55 | $this->setArguments($this->createRequestDataHolder(array(AgaviWebRequestDataHolder::SOURCE_PARAMETERS => array('product_name' => 'spam')))); |
| | 56 | |
| | 57 | $this->setAttribute('product_id', 1234); |
| | 58 | $this->setAttribute('product_name', 'spam'); |
| | 59 | $this->setAttribute('product_price', '123.45'); |
| | 60 | $this->runView('json'); |
| | 61 | $this->assertResponseHasHTTPStatus(200); |
| | 62 | $this->assertViewResultEquals('{"product_price":"123.45"}'); |
| | 63 | $this->assertResponseHasNoRedirect(); |