Skip to content
Snippets Groups Projects
Commit fe73457f authored by Eduarda Lentz Rodrigues da Silva's avatar Eduarda Lentz Rodrigues da Silva
Browse files

ZERO-162 Fix static test

parent b622029b
No related branches found
No related tags found
1 merge request!46ZERO-162-changes
Pipeline #92296 passed
......@@ -27,4 +27,4 @@ interface CmsBlockRepositoryInterface
* @return array
*/
public function getByTitle(string $title): array;
}
\ No newline at end of file
}
......@@ -50,4 +50,4 @@ class GetCmsBlockByTitle
return $blockData;
}
}
\ No newline at end of file
}
......@@ -48,12 +48,8 @@ class CmsBlockRepository implements CmsBlockRepositoryInterface
public function getByTitle(string $title): array
{
$connection = $this->resource->getConnection();
$tableName = $this->resource->getTableName(self::CMS_BLOCK_TABLE_NAME);
$select = $connection->select()->from(self::CMS_BLOCK_TABLE_NAME)->where('title = :', $title);
$sqlQuery = "SELECT * FROM $tableName WHERE title = :title";
$bind = ['title' => $title];
$result = $connection->fetchRow($sqlQuery, $bind);
return $result ?: [];
return $connection->fetchRow($select);
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment