Skip to content

Commit

Permalink
Improve test coverage a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
jbboehr committed Feb 10, 2024
1 parent 47f201b commit 29b2ec1
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/info.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--TEST--
info
--EXTENSIONS--
vyrtue
--FILE--
<?php
phpinfo(INFO_MODULES);
--EXPECTF--
%A
vyrtue
%A
Version => %A
Released => %A
Authors => %A
%A
143 => vyrtue internal
545 => vyrtue internal
542 => vyrtue internal
516 => vyrtue internal
70 => vyrtue internal
%A
13 changes: 13 additions & 0 deletions tests/replacement/replacement-06.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--TEST--
replacement 06
--EXTENSIONS--
vyrtue
--SKIPIF--
<?php if (!VyrtueExt\DEBUG) die("skip: vyrtue not debug build"); ?>
--FILE--
<?php
namespace FooBar;
var_dump(\VyrtueExt\Debug\sample_replacement_function());
--EXPECT--
entering sample function
int(12345)
14 changes: 14 additions & 0 deletions tests/replacement/replacement-07.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--TEST--
replacement 07
--EXTENSIONS--
vyrtue
--SKIPIF--
<?php if (!VyrtueExt\DEBUG) die("skip: vyrtue not debug build"); ?>
--FILE--
<?php
namespace FooBar;
use VyrtueExt\Debug;
var_dump(Debug\sample_replacement_function());
--EXPECT--
entering sample function
int(12345)
14 changes: 14 additions & 0 deletions tests/replacement/replacement-08.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--TEST--
replacement 08
--EXTENSIONS--
vyrtue
--SKIPIF--
<?php if (!VyrtueExt\DEBUG) die("skip: vyrtue not debug build"); ?>
--FILE--
<?php
namespace FooBar;
use VyrtueExt\Debug as VyrtueExtDebug;
var_dump(VyrtueExtDebug\sample_replacement_function());
--EXPECT--
entering sample function
int(12345)
14 changes: 14 additions & 0 deletions tests/replacement/replacement-09.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--TEST--
replacement 09
--EXTENSIONS--
vyrtue
--SKIPIF--
<?php if (!VyrtueExt\DEBUG) die("skip: vyrtue not debug build"); ?>
--FILE--
<?php
namespace FooBar {
var_dump(\VyrtueExt\Debug\sample_replacement_function());
}
--EXPECT--
entering sample function
int(12345)

0 comments on commit 29b2ec1

Please sign in to comment.