Paperyard
Public Member Functions | Public Attributes | List of all members
Tests\DocumentTestTest Class Reference
Inheritance diagram for Tests\DocumentTestTest:

Public Member Functions

 testDocumentFilenameParseDetectEmptyTag ()
 
 testDocumentMassFillMutability ()
 

Public Attributes

const STANDARD_FILENAME_NO_TAG = '20171123 - Sample File - Paperyard (John Doe) (EUR1000,00) [nt] -- sample.pdf'
 

Detailed Description

Definition at line 5 of file DocumentTest.php.

Member Function Documentation

Tests\DocumentTestTest::testDocumentFilenameParseDetectEmptyTag ( )

Test that filename parsing detects empty tag

Definition at line 12 of file DocumentTest.php.

13  {
14  $document = new \Paperyard\Models\Document(realpath('./') . '/tests/Functional/' . self::STANDARD_FILENAME_NO_TAG);
15  $this->assertEquals('nt', $document->tags);
16  }
Tests\DocumentTestTest::testDocumentMassFillMutability ( )

Test that filename parsing detects empty tag

Definition at line 21 of file DocumentTest.php.

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  }

Member Data Documentation

const Tests\DocumentTestTest::STANDARD_FILENAME_NO_TAG = '20171123 - Sample File - Paperyard (John Doe) (EUR1000,00) [nt] -- sample.pdf'

Definition at line 7 of file DocumentTest.php.


The documentation for this class was generated from the following file: