@@ 561-573 (lines=13) @@ | ||
558 | * |
|
559 | * @expectedException InvalidArgumentException |
|
560 | */ |
|
561 | public function testQueryEntryNameWithIncorrectOperator() |
|
562 | { |
|
563 | $memory = new MemoryWorkflowStore(); |
|
564 | $memory->createEntry('entryName'); |
|
565 | ||
566 | // Проверяем "Меньше", ожидаем неправду |
|
567 | $this->assertCount(0, $memory->query(new WorkflowExpressionQuery(new FieldExpression( |
|
568 | FieldExpression::NAME, |
|
569 | FieldExpression::ENTRY, |
|
570 | 123, |
|
571 | 'entryName' |
|
572 | )))); |
|
573 | } |
|
574 | ||
575 | /** |
|
576 | * Проверяем поиск экземпляра по состоянию |
|
@@ 580-591 (lines=12) @@ | ||
577 | * |
|
578 | * @expectedException InvalidArgumentException |
|
579 | */ |
|
580 | public function testEntryStateWithIncorrectValue() |
|
581 | { |
|
582 | $memory = new MemoryWorkflowStore(); |
|
583 | $memory->createEntry('entryName'); |
|
584 | ||
585 | $memory->query(new WorkflowExpressionQuery(new FieldExpression( |
|
586 | FieldExpression::STATE, |
|
587 | FieldExpression::ENTRY, |
|
588 | FieldExpression::EQUALS, |
|
589 | 'not string' |
|
590 | ))); |
|
591 | } |
|
592 | ||
593 | /** |
|
594 | * Тестируем поиск по состоянию |
|
@@ 670-681 (lines=12) @@ | ||
667 | /** |
|
668 | * @expectedException InvalidArgumentException |
|
669 | */ |
|
670 | public function testEntryWithIncorrectField() |
|
671 | { |
|
672 | $memory = new MemoryWorkflowStore(); |
|
673 | $memory->createEntry('entry1'); |
|
674 | ||
675 | $memory->query(new WorkflowExpressionQuery(new FieldExpression( |
|
676 | 99999, |
|
677 | FieldExpression::ENTRY, |
|
678 | 1, |
|
679 | WorkflowEntryInterface::CREATED |
|
680 | ))); |
|
681 | } |
|
682 | ||
683 | /** |
|
684 | * Тестируем наличие действия в текущем шаге |