Бета 1.1.1
This commit is contained in:
2025-07-07 18:02:04 +03:00
parent 52de613b0f
commit 6e831e2650
5 changed files with 1601 additions and 16 deletions

View File

@@ -3,7 +3,7 @@
namespace goodboyalex\php_components_pack\tests\classes;
use goodboyalex\php_components_pack\classes\File;
use goodboyalex\php_components_pack\classes\JsonReWriter;
use goodboyalex\php_components_pack\classes\BoolEx;
use goodboyalex\php_components_pack\exceptions\JsonException;
use goodboyalex\php_components_pack\tests\data\A;
use goodboyalex\php_components_pack\tests\data\C;
@@ -15,7 +15,7 @@ class JsonReWriterTest extends TestCase
{
$this->PrepareForTest();
$json = new JsonReWriter();
$json = new BoolEx();
try {
$json->Write("test/subtest/AAA", "123");
}
@@ -43,7 +43,7 @@ class JsonReWriterTest extends TestCase
{
$this->PrepareForTest();
$json = new JsonReWriter();
$json = new BoolEx();
try {
$json->Write("test/test", 123);
}
@@ -58,7 +58,7 @@ class JsonReWriterTest extends TestCase
{
$this->PrepareForTest();
$json = new JsonReWriter();
$json = new BoolEx();
try {
$json->Write("test/test1", false);
$json->Write("test/test2", true);
@@ -75,7 +75,7 @@ class JsonReWriterTest extends TestCase
{
$this->PrepareForTest();
$json = new JsonReWriter();
$json = new BoolEx();
try {
$json->Write("test/test", "test string");
}
@@ -95,7 +95,7 @@ class JsonReWriterTest extends TestCase
if (file_exists($fileName))
unlink($fileName);
$json = new JsonReWriter();
$json = new BoolEx();
try {
$json->Write("test/subtest/AAA", "123");
@@ -123,7 +123,7 @@ class JsonReWriterTest extends TestCase
{
$this->PrepareForTest();
$json = new JsonReWriter();
$json = new BoolEx();
try {
$json->Write("test/subtest/AAA", "123");
@@ -143,7 +143,7 @@ class JsonReWriterTest extends TestCase
{
$this->PrepareForTest();
$json = new JsonReWriter();
$json = new BoolEx();
try {
$json->Write("test/subtest/AAA", "123");
@@ -165,7 +165,7 @@ class JsonReWriterTest extends TestCase
{
$this->PrepareForTest();
$json = new JsonReWriter();
$json = new BoolEx();
$class = new A("test", 123, true);
@@ -188,7 +188,7 @@ class JsonReWriterTest extends TestCase
if (file_exists($fileName))
unlink($fileName);
$json = new JsonReWriter();
$json = new BoolEx();
try {
$json->Write("test/subtest/AAA", "123");
@@ -205,7 +205,7 @@ class JsonReWriterTest extends TestCase
unset($json);
$json = new JsonReWriter();
$json = new BoolEx();
$json->LoadFromFile($fileName);
@@ -218,7 +218,7 @@ class JsonReWriterTest extends TestCase
{
$this->PrepareForTest();
$json = new JsonReWriter();
$json = new BoolEx();
try {
$json->Write("test/subtest/AAA", "123");
@@ -240,7 +240,7 @@ class JsonReWriterTest extends TestCase
{
$this->PrepareForTest();
$json = new JsonReWriter();
$json = new BoolEx();
try {
$json->Write("test/subtest/AAA", "123");
$json->Write("test/subtest/BBB", 1.23);
@@ -261,7 +261,7 @@ class JsonReWriterTest extends TestCase
{
$this->PrepareForTest();
$json = new JsonReWriter();
$json = new BoolEx();
try {
$json->Write("test/subtest/AAA", "123");
$json->Write("test/subtest/BBB", 1.23);
@@ -283,7 +283,7 @@ class JsonReWriterTest extends TestCase
$serializableClass = new C("test", 123, true);
$json = new JsonReWriter();
$json = new BoolEx();
try {
$json->WriteSerializable("test", $serializableClass);
@@ -306,7 +306,7 @@ class JsonReWriterTest extends TestCase
{
$this->PrepareForTest();
$json = new JsonReWriter();
$json = new BoolEx();
try {
$json->Write("test", 1.23);
}