Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Commit

Permalink
Trying to do physical file mock, not working.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmcclure committed Oct 16, 2012
1 parent cbfd8d1 commit b956828
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
11 changes: 10 additions & 1 deletion tests/TeiDisplay_Test_AppTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ public function setUp()
$this->sheetsTable = $this->db->getTable('TeiDisplayStylesheet');
$this->textsTable = $this->db->getTable('TeiDisplayText');

// Copy XML mock to tmp.
$tmpDir = sys_get_temp_dir();
copy('mocks/winters-tale.xml',
$tmpDir . '/winters-tale.xml');

// Copy XML mock to Omeka.
copy('mocks/winters-tale.xml',
'../../../files/original/winters-tale.xml');

}


Expand Down Expand Up @@ -85,7 +94,7 @@ public function __stylesheet($title='Test Title', $xslt='xslt')
*
* @return TeiDisplayText $text.
*/
public function __text($item, $file, $active=true)
public function __text($item=null, $file=null, $active=true)
{

// Create item.
Expand Down
9 changes: 8 additions & 1 deletion tests/unit/TeiDisplayTextTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@ class TeiDisplay_TeiDisplayTextTableTest extends TeiDisplay_Test_AppTestCase
*
* @return void.
*/
public function testGetActiveText()
public function testGetActiveTextWhenTextsExist()
{

// Create item.
$item = $this->__item();

// Create texts.
$text1 = $this->__text($item);
$text2 = $this->__text($item);

}

}

0 comments on commit b956828

Please sign in to comment.