Paperyard
DocumentTest.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Tests;
4 
5 class DocumentTestTest extends \PHPUnit_Framework_TestCase
6 {
7  const STANDARD_FILENAME_NO_TAG = '20171123 - Sample File - Paperyard (John Doe) (EUR1000,00) [nt] -- sample.pdf';
8 
13  {
14  $document = new \Paperyard\Models\Document(realpath('./') . '/tests/Functional/' . self::STANDARD_FILENAME_NO_TAG);
15  $this->assertEquals('nt', $document->tags);
16  }
17 
22  {
23  $document = new \Paperyard\Models\Document(realpath('./') . '/tests/Functional/' . self::STANDARD_FILENAME_NO_TAG);
24  $document->fill(['name' => 'shouldOverwrite']);
25  $this->assertEquals(self::STANDARD_FILENAME_NO_TAG, $document->name);
26  }
27 }