Pinq\Tests\Integration\Parsing\SimpleParserTest::testMathBinaryOperations PHP Метод

testMathBinaryOperations() публичный Метод

    public function testMathBinaryOperations()
    {
        $this->assertBinaryOperation(function () {
            1 + 1;
        }, 1, O\Operators\Binary::ADDITION, 1);
        $this->assertBinaryOperation(function () {
            1 - 1;
        }, 1, O\Operators\Binary::SUBTRACTION, 1);
        $this->assertBinaryOperation(function () {
            1 * 1;
        }, 1, O\Operators\Binary::MULTIPLICATION, 1);
        $this->assertBinaryOperation(function () {
            1 / 1;
        }, 1, O\Operators\Binary::DIVISION, 1);
        $this->assertBinaryOperation(function () {
            1 % 1;
        }, 1, O\Operators\Binary::MODULUS, 1);
    }