Codeception / Codeception/module-db

Support for IN operator in Db Module

Abierto
#17 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
PHP
Estrellas
23
Forks
31
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

#### What are you trying to achieve?
I wanted to check that `$I->dontSeeInDatabase` from a list of values. Instead of writing
```php
$I->dontSeeInDatabase('someTable', ['foo' => 'cond1']);
$I->dontSeeInDatabase('someTable', ['foo' => 'cond2']);
$I->dontSeeInDatabase('someTable', ['foo' => 'cond3']);
```
I ended up writing
```php
$I->dontSeeInDatabase('someTable', [
'foo' => ['cond1', 'cond2', 'cond3']
]);
```
hoping that it would generate the following query `SELECT count(*) FROM someTable WHERE foo IN ('cond1', 'cond2', 'cond3')` and assert that the result must be 0. However I ended up getting an exception, saying array-to-string conversion - obviously enough since this is not supported.

Do you think this is something good to have, or just bad test design on my part?

* Codeception version: 2.3.3

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.