public function testSortArticles() { $articles = self::mockArticles(); $slim = new \Slim\Slim(array('view' => new \Textpress\View())); $textpress = new Textpress($slim, self::config()); $sorted = $textpress->sortArticles($articles); $firstArticle = array_shift($sorted); $this->assertEquals('Test title 2', $firstArticle->getTitle()); }