Hoa central
System.php
Go to the documentation of this file.
1 <?php
2 
38 
40 use Hoa\Test;
41 
50 class System extends Test\Unit\Suite
51 {
52  public function case_classic()
53  {
54  $this
55  ->given(
56  $this->function->setlocale = 'C/fr_FR.UTF-8/C/C/C/C',
57  $localizer = new CUT()
58  )
59  ->when($result = $localizer->getLocale())
60  ->then
61  ->string($result)
62  ->isEqualTo('fr-FR');
63  }
64 
65  public function case_null()
66  {
67  $this
68  ->given(
69  $this->function->setlocale = 'C/C/C/C/C/C',
70  $localizer = new CUT()
71  )
72  ->when($result = $localizer->getLocale())
73  ->then
74  ->variable($result)
75  ->isNull();
76  }
77 
78  public function case_not_encoding()
79  {
80  $this
81  ->given(
82  $this->function->setlocale = 'C/fr_FR/C/C/C/C',
83  $localizer = new CUT()
84  )
85  ->when($result = $localizer->getLocale())
86  ->then
87  ->string($result)
88  ->isEqualTo('fr-FR');
89  }
90 }