Example #1
0
 public function testFailGetFileName()
 {
     $Repo = new NbpRepository(self::$_NbpCache);
     $test_data = [[['150102', 'a'], EWrongNbpDateFormat::class], [['2015-01-01', 'c'], ENbpEntryNotFound::class], [['2015-01-01', 'h'], ENbpEntryNotFound::class], [['2015-01-01', 'a'], ENbpEntryNotFound::class], [['2015-01-01', 'b'], ENbpEntryNotFound::class], [['2010-12-13', 'b'], ENbpEntryNotFound::class]];
     foreach ($test_data as $data) {
         $Exc = null;
         try {
             $Repo->getFileName($data[0][0], $data[0][1]);
         } catch (\Exception $Exc) {
         }
         $this->assertNotNull($Exc);
         $this->assertInstanceOf($data[1], $Exc);
     }
 }