public function testCurrentPage() { $this->uri->initializeWithURL('http://localhost/foo/page:test')->init(); $this->assertSame('test', $this->uri->currentPage()); $this->uri->initializeWithURL('http://localhost:8080/a-page')->init(); $this->assertSame(1, $this->uri->currentPage()); $this->uri->initializeWithURL('http://localhost:8080/a-page/page:2')->init(); $this->assertSame('2', $this->uri->currentPage()); $this->uri->initializeWithURL('http://localhost:8080/a-page/page:x')->init(); $this->assertSame('x', $this->uri->currentPage()); $this->uri->initializeWithURL('http://localhost:8080/a-page/page:')->init(); $this->assertSame('', $this->uri->currentPage()); }