/** * Test getBases with a provided file and default settings */ public function testGetBasesWithProvidedFile() { $this->source->initialize(); $bases = $this->source->getBases('assets/images/logo.png'); $this->assertEquals('', $bases['path'], 'Index "path" does not match expected.'); $this->assertEquals(true, $bases['pathIsRelative'], 'Index "pathIsRelative" does not match expected.'); $this->assertEquals(MODX_BASE_PATH, $bases['pathAbsolute'], 'Index "pathAbsolute" does not match expected.'); $this->assertEquals(MODX_BASE_PATH . 'assets/images/logo.png', $bases['pathAbsoluteWithPath'], 'Index "pathAbsoluteFull" does not match expected.'); $this->assertEquals('assets/images/logo.png', $bases['pathRelative'], 'Index "pathRelative" does not match expected.'); $this->assertEquals('', $bases['url'], 'Index "url" does not match expected.'); $this->assertEquals(true, $bases['urlIsRelative'], 'Index "urlIsRelative" does not match expected.'); $this->assertEquals('/', $bases['urlAbsolute'], 'Index "urlAbsolute" does not match expected.'); $this->assertEquals('/assets/images/logo.png', $bases['urlAbsoluteWithPath'], 'Index "urlAbsoluteWithPath" does not match expected.'); $this->assertEquals('assets/images/logo.png', $bases['urlRelative'], 'Index "urlRelative" does not match expected.'); }