/**
	 * Tests the JApplicationWeb::allowCache method.
	 *
	 * @return  void
	 *
	 * @since   11.3
	 */
	public function testAllowCache()
	{
		$this->assertThat(
			$this->class->allowCache(),
			$this->isFalse(),
			'Return value of allowCache should be false by default.'
		);

		$this->assertThat(
			$this->class->allowCache(true),
			$this->isTrue(),
			'Return value of allowCache should return the new state.'
		);

		$this->assertThat(
			TestReflection::getValue($this->class, 'response')->cachable,
			$this->isTrue(),
			'Checks the internal cache property has been set.'
		);
	}
Пример #2
0
 /**
  * Tests the JApplicationWeb::allowCache method.
  *
  * @return  void
  *
  * @since   11.3
  */
 public function testAllowCache()
 {
     $this->assertFalse($this->class->allowCache());
     $this->assertTrue($this->class->allowCache(true));
 }