You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'Abc\Interface1 cannot be represented with Nette\PhpGenerator\ClassType. Call Nette\PhpGenerator\InterfaceType::from() or Nette\PhpGenerator\ClassLike::from() instead.',
18
18
);
19
19
20
-
Assert::error(
20
+
Assert::exception(
21
21
fn() => TraitType::from(Abc\Class1::class),
22
-
E_USER_WARNING,
22
+
Nette\InvalidArgumentException::class,
23
23
'Abc\Class1 cannot be represented with Nette\PhpGenerator\TraitType. Call Nette\PhpGenerator\ClassType::from() or Nette\PhpGenerator\ClassLike::from() instead.',
24
24
);
25
25
26
-
Assert::error(
26
+
Assert::exception(
27
27
fn() => ClassType::fromCode('<?php interface I {}'),
28
-
E_USER_WARNING,
28
+
Nette\InvalidArgumentException::class,
29
29
'Provided code cannot be represented with Nette\PhpGenerator\ClassType. Call Nette\PhpGenerator\InterfaceType::fromCode() or Nette\PhpGenerator\ClassLike::fromCode() instead.',
30
30
);
31
31
32
-
Assert::error(
32
+
Assert::exception(
33
33
fn() => InterfaceType::fromCode('<?php trait T {}'),
34
-
E_USER_WARNING,
34
+
Nette\InvalidArgumentException::class,
35
35
'Provided code cannot be represented with Nette\PhpGenerator\InterfaceType. Call Nette\PhpGenerator\TraitType::fromCode() or Nette\PhpGenerator\ClassLike::fromCode() instead.',
0 commit comments