public function testExtAccessors() { $file = new \r8\FileSys\File(); $this->assertNull($file->getExt()); $this->assertFalse($file->extExists()); $this->assertSame($file, $file->setExt(".ext")); $this->assertSame("ext", $file->getExt()); $this->assertTrue($file->extExists()); $this->assertSame($file, $file->setExt(".")); $this->assertNull($file->getExt()); $this->assertFalse($file->extExists()); $this->assertSame($file, $file->setExt("")); $this->assertNull($file->getExt()); $this->assertFalse($file->extExists()); $this->assertSame($file, $file->setExt("php.BAK")); $this->assertSame("php.BAK", $file->getExt()); $this->assertTrue($file->extExists()); $this->assertSame($file, $file->clearExt()); $this->assertNull($file->getExt()); $this->assertFalse($file->extExists()); }