Hoa central
Zombie.php
Go to the documentation of this file.
1 <?php
2 
38 
39 use Hoa\Test;
40 use Hoa\Zombie as LUT;
41 
50 class Zombie extends Test\Unit\Suite
51 {
52  public function case_without_fpm()
53  {
54  $this
55  ->given(
56  $this->function->function_exists = function ($name) {
57  if ('fastcgi_finish_request' === $name) {
58  return false;
59  }
60 
61  return true;
62  }
63  )
64  ->exception(function () {
65  LUT::fork();
66  })
67  ->isInstanceOf('Hoa\Zombie\Exception');
68  }
69 
70  public function case_with_fpm()
71  {
72  $this
73  ->given(
74  $this->function->function_exists = function ($name) {
75  return true;
76  },
77  $this->function->fastcgi_finish_request = true
78  )
79  ->when($result = LUT::fork())
80  ->boolean($result)
81  ->isTrue();
82  }
83 }