Exemplo n.º 1
0
 /** @test */
 function it_calls_special_sortable_function()
 {
     try {
         SortableItem::sortable('special_key', 'asc');
     } catch (\Exception $e) {
         if ($e->getMessage() === 'special_key') {
             return;
         }
     }
     $this->fail('Special function not called, test fails.');
 }
Exemplo n.º 2
0
 /** @test */
 function it_generates_sortable_active_links()
 {
     SortableItem::sortable();
     $supporter = $this->getSupporter();
     $this->assertEquals('<a title="Title" class="sortable-link sortable-link--asc sortable-link--active" href="http://localhost?s=id&d=desc">Text</a>', $supporter->generateLinkFor('id', 'Text', 'Title'));
 }