@@ -47,22 +47,22 @@ public function testGetRelatedTablesByInheritance(): void
47
47
}
48
48
49
49
/**
50
- * @expectedException \TheCodingMachine\TDBM\TDBMException
51
50
*
52
51
* @throws TDBMException
53
52
*/
54
53
public function testGetPrimaryKeysFromIndexedPrimaryKeysException (): void
55
54
{
55
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMException ' );
56
56
$ this ->tdbmService ->_getPrimaryKeysFromIndexedPrimaryKeys ('users ' , [5 , 4 ]);
57
57
}
58
58
59
59
/**
60
- * @expectedException \TheCodingMachine\TDBM\TDBMException
61
60
*
62
61
* @throws TDBMException
63
62
*/
64
63
public function testGetLinkBetweenInheritedTablesExceptions (): void
65
64
{
65
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMException ' );
66
66
$ this ->tdbmService ->_getLinkBetweenInheritedTables (['contact ' , 'country ' ]);
67
67
}
68
68
@@ -156,12 +156,12 @@ public function testUpdatePrimaryKey(): void
156
156
}
157
157
158
158
/**
159
- * @expectedException \TheCodingMachine\TDBM\TDBMInvalidOperationException
160
159
*
161
160
* @throws TDBMInvalidOperationException
162
161
*/
163
162
public function testCannotDeleteDetachedObjects (): void
164
163
{
164
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMInvalidOperationException ' );
165
165
$ object = new TDBMObject ('rights ' );
166
166
$ object ->setProperty ('label ' , 'CAN_DELETE ' );
167
167
@@ -338,36 +338,36 @@ public function testArrayAccess(): void
338
338
}
339
339
340
340
/**
341
- * @expectedException \TheCodingMachine\TDBM\TDBMInvalidOffsetException
342
341
*
343
342
* @throws TDBMInvalidOffsetException
344
343
*/
345
344
public function testArrayAccessException (): void
346
345
{
346
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMInvalidOffsetException ' );
347
347
$ beans = $ this ->tdbmService ->findObjects ('contact ' , null , [], 'contact.id ASC ' , [], null , TDBMObject::class);
348
348
349
349
$ beans [-1 ];
350
350
}
351
351
352
352
/**
353
- * @expectedException \TheCodingMachine\TDBM\TDBMInvalidOffsetException
354
353
*
355
354
* @throws TDBMInvalidOffsetException
356
355
*/
357
356
public function testArrayAccessException2 (): void
358
357
{
358
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMInvalidOffsetException ' );
359
359
$ beans = $ this ->tdbmService ->findObjects ('contact ' , null , [], 'contact.id ASC ' , [], null , TDBMObject::class);
360
360
361
361
$ beans ['foo ' ];
362
362
}
363
363
364
364
/**
365
- * @expectedException \TheCodingMachine\TDBM\TDBMException
366
365
*
367
366
* @throws TDBMException
368
367
*/
369
368
public function testBeanGetException (): void
370
369
{
370
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMException ' );
371
371
$ beans = $ this ->tdbmService ->findObjects ('contact ' , null , [], 'contact.id ASC ' , [], null , TDBMObject::class);
372
372
$ bean = $ beans [0 ];
373
373
@@ -376,12 +376,12 @@ public function testBeanGetException(): void
376
376
}
377
377
378
378
/**
379
- * @expectedException \TheCodingMachine\TDBM\TDBMException
380
379
*
381
380
* @throws TDBMException
382
381
*/
383
382
public function testBeanSetException (): void
384
383
{
384
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMException ' );
385
385
$ beans = $ this ->tdbmService ->findObjects ('contact ' , null , [], 'contact.id ASC ' , [], null , TDBMObject::class);
386
386
$ bean = $ beans [0 ];
387
387
@@ -464,48 +464,48 @@ public function testMap(): void
464
464
}
465
465
466
466
/**
467
- * @expectedException \TheCodingMachine\TDBM\TDBMException
468
467
*
469
468
* @throws TDBMException
470
469
*/
471
470
public function testUnsetException (): void
472
471
{
472
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMException ' );
473
473
$ beans = $ this ->tdbmService ->findObjects ('contact ' , null , [], 'contact.id ASC ' , [], null , TDBMObject::class);
474
474
475
475
unset($ beans [0 ]);
476
476
}
477
477
478
478
/**
479
- * @expectedException \TheCodingMachine\TDBM\TDBMException
480
479
*
481
480
* @throws TDBMException
482
481
*/
483
482
public function testSetException (): void
484
483
{
484
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMException ' );
485
485
$ beans = $ this ->tdbmService ->findObjects ('contact ' , null , [], 'contact.id ASC ' , [], null , TDBMObject::class);
486
486
487
487
$ beans [0 ] = 'foo ' ;
488
488
}
489
489
490
490
/**
491
- * @expectedException \TheCodingMachine\TDBM\TDBMException
492
491
*
493
492
* @throws TDBMException
494
493
*/
495
494
public function testPageUnsetException (): void
496
495
{
496
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMException ' );
497
497
$ beans = $ this ->tdbmService ->findObjects ('contact ' , null , [], 'contact.id ASC ' , [], null , TDBMObject::class);
498
498
$ page = $ beans ->take (0 , 1 );
499
499
unset($ page [0 ]);
500
500
}
501
501
502
502
/**
503
- * @expectedException \TheCodingMachine\TDBM\TDBMException
504
503
*
505
504
* @throws TDBMException
506
505
*/
507
506
public function testPageSetException (): void
508
507
{
508
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMException ' );
509
509
$ beans = $ this ->tdbmService ->findObjects ('contact ' , null , [], 'contact.id ASC ' , [], null , TDBMObject::class);
510
510
$ page = $ beans ->take (0 , 1 );
511
511
$ page [0 ] = 'foo ' ;
@@ -570,32 +570,32 @@ public function testSetFetchMode(): void
570
570
}
571
571
572
572
/**
573
- * @expectedException \TheCodingMachine\TDBM\TDBMException
574
573
*
575
574
* @throws TDBMException
576
575
*/
577
576
public function testInvalidSetFetchMode (): void
578
577
{
578
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMException ' );
579
579
$ this ->tdbmService ->setFetchMode (99 );
580
580
}
581
581
582
582
/**
583
- * @expectedException \TheCodingMachine\TDBM\TDBMException
584
583
*
585
584
* @throws TDBMException
586
585
*/
587
586
public function testCursorModeException (): void
588
587
{
588
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMException ' );
589
589
$ beans = $ this ->tdbmService ->findObjects ('contact ' , 'contact.id = :id ' , ['id ' => 1 ], null , [], 99 );
590
590
}
591
591
592
592
/**
593
- * @expectedException \TheCodingMachine\TDBM\TDBMException
594
593
*
595
594
* @throws TDBMException
596
595
*/
597
596
public function testTableNameException (): void
598
597
{
598
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMException ' );
599
599
$ beans = $ this ->tdbmService ->findObjects ('foo bar ' );
600
600
}
601
601
@@ -612,12 +612,12 @@ public function testFindObject(): void
612
612
}
613
613
614
614
/**
615
- * @expectedException \TheCodingMachine\TDBM\NoBeanFoundException
616
615
*
617
616
* @throws NoBeanFoundException
618
617
*/
619
618
public function testFindObjectOrFail (): void
620
619
{
620
+ $ this ->expectException ('TheCodingMachine\TDBM\NoBeanFoundException ' );
621
621
$ bean = $ this ->tdbmService ->findObjectOrFail ('contact ' , 'contact.id = :id ' , ['id ' => -42 ], [], TDBMObject::class);
622
622
}
623
623
@@ -651,13 +651,13 @@ public function testFindObjectsByBean(): void
651
651
}
652
652
653
653
/**
654
- * @expectedException \TheCodingMachine\TDBM\TDBMException
655
654
*
656
655
* @throws TDBMException
657
656
* @throws TDBMInvalidOperationException
658
657
*/
659
658
public function testBeanWithoutStatus (): void
660
659
{
660
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMException ' );
661
661
$ reflectionClass = new \ReflectionClass (TDBMObject::class);
662
662
$ object = $ reflectionClass ->newInstanceWithoutConstructor ();
663
663
$ object ->_getStatus ();
@@ -677,12 +677,12 @@ public function testFindObjectsFromSql(): void
677
677
}
678
678
679
679
/**
680
- * @expectedException \TheCodingMachine\TDBM\TDBMException
681
680
*
682
681
* @throws TDBMException
683
682
*/
684
683
public function testFindObjectsFromSqlBadTableName (): void
685
684
{
685
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMException ' );
686
686
$ this ->tdbmService ->findObjectsFromSql (
687
687
'#{azerty ' ,
688
688
'roles JOIN roles_rights ON roles.id = roles_rights.role_id JOIN rights ON rights.label = roles_rights.right_label ' ,
@@ -693,12 +693,12 @@ public function testFindObjectsFromSqlBadTableName(): void
693
693
}
694
694
695
695
/**
696
- * @expectedException \TheCodingMachine\TDBM\TDBMException
697
696
*
698
697
* @throws TDBMException
699
698
*/
700
699
public function testFindObjectsFromSqlGroupBy (): void
701
700
{
701
+ $ this ->expectException ('TheCodingMachine\TDBM\TDBMException ' );
702
702
$ roles = $ this ->tdbmService ->findObjectsFromSql (
703
703
'roles ' ,
704
704
'roles JOIN roles_rights ON roles.id = roles_rights.role_id JOIN rights ON rights.label = roles_rights.right_label ' ,
0 commit comments