/** * @test * @group jsend.chaining */ public function test_chaining() { $jsend = new JSend(); $this->assertTrue($jsend === $jsend->bind('foo', $bar)); $this->assertTrue($jsend === $jsend->filter(array())); $this->assertTrue($jsend === $jsend->filter('foo', 'Foo::bar')); $this->assertTrue($jsend === $jsend->data('foo', 'bar')); $this->assertTrue($jsend === $jsend->set('foo', 'bar')); $this->assertTrue($jsend === $jsend->set(array('foo' => 'bar'))); $this->assertTrue($jsend === $jsend->code(500)); $this->assertTrue($jsend === $jsend->message('fubar')); $this->assertTrue($jsend === $jsend->status(JSend::ERROR)); }