Example #1
0
 public function testGetArticlePath()
 {
     $slim = new \Slim\Slim(array('view' => new \Textpress\View()));
     $textpress = new Textpress($slim, self::config());
     $textpress->init();
     $articles = $textpress->loadArticles();
     $filename = '2012-02-06-test-article.txt';
     $path = $textpress->getArticlePath($filename);
     $this->assertEquals(__DIR__ . '/articles/' . $filename, $path);
     $this->assertFalse($textpress->getArticlePath('no-such-files.txt'));
 }