Esempio n. 1
0
 public function testGetters()
 {
     $name = $this->getFaker()->word;
     $recordSpec1 = \Mockery::mock('Giftcards\\FixedWidth\\Spec\\RecordSpec');
     $recordSpec2 = \Mockery::mock('Giftcards\\FixedWidth\\Spec\\RecordSpec');
     $recordSpecs = array('record1' => $recordSpec1, 'record2' => $recordSpec2);
     $width = $this->getFaker()->numberBetween(10, 20);
     $spec = new FileSpec($name, $recordSpecs, $width, "\r\n");
     $this->assertEquals($name, $spec->getName());
     $this->assertSame($recordSpecs, $spec->getRecordSpecs());
     $this->assertSame($recordSpec1, $spec->getRecordSpec('record1'));
     $this->assertSame($recordSpec2, $spec->getRecordSpec('record2'));
     $this->assertEquals("\r\n", $spec->getLineSeparator());
 }