Completed
Push — 3.x ( 377254...28590d )
by San
02:50
created

BaseContext::not()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 11
rs 9.4285
cc 2
eloc 6
nc 2
nop 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A BaseContext::getMinkContext() 0 8 1
1
<?php
2
3
namespace Behatch\Context;
4
5
use Behat\Behat\Context\TranslatableContext;
6
use Behat\MinkExtension\Context\RawMinkContext;
7
8
abstract class BaseContext extends RawMinkContext implements TranslatableContext
9
{
10
    use \Behatch\Html;
11
    use \Behatch\Asserter;
12
13
    public static function getTranslationResources()
14
    {
15
        return glob(__DIR__ . '/../../i18n/*.xliff');
16
    }
17
18
    /**
19
     * @transform /^(0|[1-9]\d*)(?:st|nd|rd|th)?$/
20
     */
21
    public function castToInt($count)
22
    {
23
        return intval($count);
24
    }
25
26
    protected function getMinkContext()
27
    {
28
        $context = new \Behat\MinkExtension\Context\MinkContext();
29
        $context->setMink($this->getMink());
30
        $context->setMinkParameters($this->getMinkParameters());
31
32
        return $context;
33
    }
34
}
35