GitHub
Tests: 12 • Commercial: 2 • Pet projects: 4 • Legacy: 4
Total: 22

.NET Framework

Test
2021

Project Request

ASP.NET MVC • C# • SQL Server
Idea of the project: if someone wants to order a project development, here you can send an application.
Test
2020

ProjectC

ASP.NET MVC • C# • JSON • jQuery
JSON data processing.
Test
2020

Vehicle Maintenance

ASP.NET MVC • VB.NET • JSON
Idea of the project: if someone wants to order a project development, here you can send an application.
Test
2019

Movie Navigator

ASP.NET MVC • VB.NET
Request information about movie from IMDB.
Test
2018

Customers Exchange

ASP.NET MVC • C# • SQL Server
Automated teller machine emulation.
Test
2016

ATM

ASP.NET MVC • C#
Automated teller machine emulation.

.NET Core

Pet project
2022

Mail Daemon

.NET 9 • Console • JSON
Utility to send mails with customizable settings.

Custom

Code
2024

Buns of code

.NET Framework • C# • JavaScript
Code snippets from my projects, ready to use; tiny tests; code examples.

PHP

Test
2024

Mediabox

PHP 8 • Laravel 11 • Vue.js • Composer • SQLite
Test project for media files management.
Test
2020

Loan Castle

PHP • MariaDB
Jums jāizstrādā kāda lielāk projekta prototips. Izstrādājot prototipu, paturiet prātā, ka projektam attīstoties, šo prototipu varētu vajadzēt pilnveidot.
Test
2020

Content Management

PHP • MySQL • AJAX
Создать простой сайт, где будет страница с формой для авторизации и страница для авторизованного пользователя.
Test
2019

Laravel

PHP • Laravel • Vue.js • Composer • SQLite
Izveidot aplikāciju, kura ik pēc noteikta intervāla (60 sekundes) veic ierakstu datubāzē izmantojot Laravel freimworka iebūvēto funkcionalitāti.
Test
2019

Phone Check

PHP • JavaScript • JSON • Docker
Implement application to detect country by phone number.

Frontend

Test
2021

Forex Wall

npm • React
For this exercise, what we need is a simple live wall for tracking currencies.

Business projects

Commercial
2008

Certification Center

.NET Framework 4.8 • ASP.NET Web Forms • C# • LINQ • SQL Server • ADO.NET • Dapper • JavaScript • jQuery • Git
Transport registration and certification services in Latvia, Customer Relationship Management.
Commercial
2000

Amerikas Auto

.NET Framework 4.8 • ASP.NET Web Forms • C# • LINQ • SQL Server • ADO.NET • Entity Framework • JavaScript • jQuery • Git
Car service and spare parts for all USA and European car models, Customer Relationship Management.

Pet projects

Pet project
2023

Geolocation Assistant

.NET 8 • ASP.NET Core • C# • Web API • JSON • Git
Website for determining geolocation by IP or geotagged photo.
Pet project
2008

Web Dynamics

.NET Framework 4.8 • ASP.NET Web Forms • C# • LINQ • Web API • JSON • SQL Server • Dapper • JavaScript • jQuery • SVG • Git
Software development blog. Articles, books, videos, content management.
Pet project
2000

Blackball

.NET Framework 4.8 • ASP.NET Web Forms • C# • LINQ • Web API • JSON • XML • SQL Server • Dapper • JavaScript • jQuery • SVG • Git
My entertainment portal created from scratch.

Good old times

Legacy
2000

DOS Clock

Turbo Pascal • Assembler
Digital clock.
Legacy
2000

BrainOut

Turbo Pascal • Assembler
Tank battle game.
Legacy
1999

Airport Administrator

Turbo Pascal
Курсовая работа в институте.
Legacy
1998

Atomizer

Turbo Pascal • Assembler
Atomizer, aka «Studio2D». Graphic raster editor. AGI is my own «Atomizer Generated Image» file format.

Laravel

2019 Test

Izveidot aplikāciju, kura ik pēc noteikta intervāla (60 sekundes) veic ierakstu datubāzē izmantojot Laravel freimworka iebūvēto funkcionalitāti.

PHP Laravel Vue.js Composer SQLite
Information
Source code
  app
  Http
  Auth
  css
  js
  js
  lang
  en
  sass
  app
  data
  logs
  Unit
  src
  src
  lib
  docs
  en
  src
  docs
  en
  lib
  src
  Cron
  Cron
  src
  filp
  src
  css
  js
  Util
  src
  ORM
  Spot
  test
  Core
  Text
  Type
  Xml
  Core
  Text
  Type
  Xml
  html
  src
  src
  src
  Auth
  make
  auth
  Bus
  Auth
  Bus
  Http
  Mail
  View
  Auth
  Bus
  Http
  Http
  Json
  Log
  Mail
  html
  text
  Jobs
  View
  src
  src
  Util
  docs
  Pass
  Pass
  Pass
  doc
  src
  Curl
  doc
  f001
  f002
  f003
  f004
  f005
  f006
  f007
  f008
  src
  Date
  Spl
  src
  Lang
  List
  doc
  lib
  Node
  Expr
  Cast
  Name
  Stmt
  test
  code
  expr
  uvs
  stmt
  loop
  expr
  stmt
  Node
  Stmt
  src
  opis
  src
  dist
  lib
  src
  xml
  xml
  src
  Unit
  src
  src
  Tags
  src
  src
  src
  Call
  Node
  Call
  Util
  src
  Node
  Html
  css
  js
  Xml
  HTML
  XML
  src
  src
  src
  src
  src
  Stub
  Hook
  Util
  Log
  PHP
  cli
  1149
  1216
  1265
  1330
  1335
  1337
  1348
  1351
  1374
  1437
  1468
  1471
  1472
  1570
  2085
  2137
  2145
  2158
  2366
  2380
  2382
  2435
  244
  2448
  2724
  2725
  2731
  2811
  2830
  2972
  3093
  3107
  3156
  322
  3364
  3379
  3380
  3396
  433
  445
  498
  503
  581
  74
  765
  797
  873
  Trac
  1021
  523
  578
  684
  783
  fail
  unit
  Util
  PHP
  psr
  src
  log
  Psr
  Log
  Test
  src
  psy
  src
  Sudo
  Util
  test
  Sudo
  Util
  box
  uuid
  src
  Time
  Node
  Time
  src
  src
  diff
  src
  out
  src
  src
  src
  src
  src
  src
  src
  src
  doc
  lib
  Mime
  Pop
  Auth
  Mime
  bug
  unit
  Mime
  Auth
  dkim
  Node
  Node
  psr4
  phpt
  .dot
  b
  a
  A
  B
  C
  copy
  A
  B
  C
  one
  b
  .dot
  a
  dir
  File
  Test
  File
  test
  Test
  Log
  Log
  mime
  Part
  test
  Part
  glob
  Test
  data
  dat
  res
  Util
  Util
  Test
  css
  js
  Test
  Test
  src
  src
  Css
  Rule
  src
  src
  .env
  null
Root / vendor / symfony / console / Tests / Input / InputDefinitionTest.php
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Console\Tests\Input; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputOption; class InputDefinitionTest extends TestCase { protected static $fixtures; protected $foo; protected $bar; protected $foo1; protected $foo2; public static function setUpBeforeClass() { self::$fixtures = __DIR__.'/../Fixtures/'; } public function testConstructorArguments() { $this->initializeArguments(); $definition = new InputDefinition(); $this->assertEquals([], $definition->getArguments(), '__construct() creates a new InputDefinition object'); $definition = new InputDefinition([$this->foo, $this->bar]); $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getArguments(), '__construct() takes an array of InputArgument objects as its first argument'); } public function testConstructorOptions() { $this->initializeOptions(); $definition = new InputDefinition(); $this->assertEquals([], $definition->getOptions(), '__construct() creates a new InputDefinition object'); $definition = new InputDefinition([$this->foo, $this->bar]); $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getOptions(), '__construct() takes an array of InputOption objects as its first argument'); } public function testSetArguments() { $this->initializeArguments(); $definition = new InputDefinition(); $definition->setArguments([$this->foo]); $this->assertEquals(['foo' => $this->foo], $definition->getArguments(), '->setArguments() sets the array of InputArgument objects'); $definition->setArguments([$this->bar]); $this->assertEquals(['bar' => $this->bar], $definition->getArguments(), '->setArguments() clears all InputArgument objects'); } public function testAddArguments() { $this->initializeArguments(); $definition = new InputDefinition(); $definition->addArguments([$this->foo]); $this->assertEquals(['foo' => $this->foo], $definition->getArguments(), '->addArguments() adds an array of InputArgument objects'); $definition->addArguments([$this->bar]); $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getArguments(), '->addArguments() does not clear existing InputArgument objects'); } public function testAddArgument() { $this->initializeArguments(); $definition = new InputDefinition(); $definition->addArgument($this->foo); $this->assertEquals(['foo' => $this->foo], $definition->getArguments(), '->addArgument() adds a InputArgument object'); $definition->addArgument($this->bar); $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getArguments(), '->addArgument() adds a InputArgument object'); } /** * @expectedException \LogicException * @expectedExceptionMessage An argument with name "foo" already exists. */ public function testArgumentsMustHaveDifferentNames() { $this->initializeArguments(); $definition = new InputDefinition(); $definition->addArgument($this->foo); $definition->addArgument($this->foo1); } /** * @expectedException \LogicException * @expectedExceptionMessage Cannot add an argument after an array argument. */ public function testArrayArgumentHasToBeLast() { $this->initializeArguments(); $definition = new InputDefinition(); $definition->addArgument(new InputArgument('fooarray', InputArgument::IS_ARRAY)); $definition->addArgument(new InputArgument('anotherbar')); } /** * @expectedException \LogicException * @expectedExceptionMessage Cannot add a required argument after an optional one. */ public function testRequiredArgumentCannotFollowAnOptionalOne() { $this->initializeArguments(); $definition = new InputDefinition(); $definition->addArgument($this->foo); $definition->addArgument($this->foo2); } public function testGetArgument() { $this->initializeArguments(); $definition = new InputDefinition(); $definition->addArguments([$this->foo]); $this->assertEquals($this->foo, $definition->getArgument('foo'), '->getArgument() returns a InputArgument by its name'); } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage The "bar" argument does not exist. */ public function testGetInvalidArgument() { $this->initializeArguments(); $definition = new InputDefinition(); $definition->addArguments([$this->foo]); $definition->getArgument('bar'); } public function testHasArgument() { $this->initializeArguments(); $definition = new InputDefinition(); $definition->addArguments([$this->foo]); $this->assertTrue($definition->hasArgument('foo'), '->hasArgument() returns true if a InputArgument exists for the given name'); $this->assertFalse($definition->hasArgument('bar'), '->hasArgument() returns false if a InputArgument exists for the given name'); } public function testGetArgumentRequiredCount() { $this->initializeArguments(); $definition = new InputDefinition(); $definition->addArgument($this->foo2); $this->assertEquals(1, $definition->getArgumentRequiredCount(), '->getArgumentRequiredCount() returns the number of required arguments'); $definition->addArgument($this->foo); $this->assertEquals(1, $definition->getArgumentRequiredCount(), '->getArgumentRequiredCount() returns the number of required arguments'); } public function testGetArgumentCount() { $this->initializeArguments(); $definition = new InputDefinition(); $definition->addArgument($this->foo2); $this->assertEquals(1, $definition->getArgumentCount(), '->getArgumentCount() returns the number of arguments'); $definition->addArgument($this->foo); $this->assertEquals(2, $definition->getArgumentCount(), '->getArgumentCount() returns the number of arguments'); } public function testGetArgumentDefaults() { $definition = new InputDefinition([ new InputArgument('foo1', InputArgument::OPTIONAL), new InputArgument('foo2', InputArgument::OPTIONAL, '', 'default'), new InputArgument('foo3', InputArgument::OPTIONAL | InputArgument::IS_ARRAY), // new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', [1, 2]), ]); $this->assertEquals(['foo1' => null, 'foo2' => 'default', 'foo3' => []], $definition->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument'); $definition = new InputDefinition([ new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', [1, 2]), ]); $this->assertEquals(['foo4' => [1, 2]], $definition->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument'); } public function testSetOptions() { $this->initializeOptions(); $definition = new InputDefinition([$this->foo]); $this->assertEquals(['foo' => $this->foo], $definition->getOptions(), '->setOptions() sets the array of InputOption objects'); $definition->setOptions([$this->bar]); $this->assertEquals(['bar' => $this->bar], $definition->getOptions(), '->setOptions() clears all InputOption objects'); } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage The "-f" option does not exist. */ public function testSetOptionsClearsOptions() { $this->initializeOptions(); $definition = new InputDefinition([$this->foo]); $definition->setOptions([$this->bar]); $definition->getOptionForShortcut('f'); } public function testAddOptions() { $this->initializeOptions(); $definition = new InputDefinition([$this->foo]); $this->assertEquals(['foo' => $this->foo], $definition->getOptions(), '->addOptions() adds an array of InputOption objects'); $definition->addOptions([$this->bar]); $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getOptions(), '->addOptions() does not clear existing InputOption objects'); } public function testAddOption() { $this->initializeOptions(); $definition = new InputDefinition(); $definition->addOption($this->foo); $this->assertEquals(['foo' => $this->foo], $definition->getOptions(), '->addOption() adds a InputOption object'); $definition->addOption($this->bar); $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getOptions(), '->addOption() adds a InputOption object'); } /** * @expectedException \LogicException * @expectedExceptionMessage An option named "foo" already exists. */ public function testAddDuplicateOption() { $this->initializeOptions(); $definition = new InputDefinition(); $definition->addOption($this->foo); $definition->addOption($this->foo2); } /** * @expectedException \LogicException * @expectedExceptionMessage An option with shortcut "f" already exists. */ public function testAddDuplicateShortcutOption() { $this->initializeOptions(); $definition = new InputDefinition(); $definition->addOption($this->foo); $definition->addOption($this->foo1); } public function testGetOption() { $this->initializeOptions(); $definition = new InputDefinition([$this->foo]); $this->assertEquals($this->foo, $definition->getOption('foo'), '->getOption() returns a InputOption by its name'); } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage The "--bar" option does not exist. */ public function testGetInvalidOption() { $this->initializeOptions(); $definition = new InputDefinition([$this->foo]); $definition->getOption('bar'); } public function testHasOption() { $this->initializeOptions(); $definition = new InputDefinition([$this->foo]); $this->assertTrue($definition->hasOption('foo'), '->hasOption() returns true if a InputOption exists for the given name'); $this->assertFalse($definition->hasOption('bar'), '->hasOption() returns false if a InputOption exists for the given name'); } public function testHasShortcut() { $this->initializeOptions(); $definition = new InputDefinition([$this->foo]); $this->assertTrue($definition->hasShortcut('f'), '->hasShortcut() returns true if a InputOption exists for the given shortcut'); $this->assertFalse($definition->hasShortcut('b'), '->hasShortcut() returns false if a InputOption exists for the given shortcut'); } public function testGetOptionForShortcut() { $this->initializeOptions(); $definition = new InputDefinition([$this->foo]); $this->assertEquals($this->foo, $definition->getOptionForShortcut('f'), '->getOptionForShortcut() returns a InputOption by its shortcut'); } public function testGetOptionForMultiShortcut() { $this->initializeOptions(); $definition = new InputDefinition([$this->multi]); $this->assertEquals($this->multi, $definition->getOptionForShortcut('m'), '->getOptionForShortcut() returns a InputOption by its shortcut'); $this->assertEquals($this->multi, $definition->getOptionForShortcut('mmm'), '->getOptionForShortcut() returns a InputOption by its shortcut'); } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage The "-l" option does not exist. */ public function testGetOptionForInvalidShortcut() { $this->initializeOptions(); $definition = new InputDefinition([$this->foo]); $definition->getOptionForShortcut('l'); } public function testGetOptionDefaults() { $definition = new InputDefinition([ new InputOption('foo1', null, InputOption::VALUE_NONE), new InputOption('foo2', null, InputOption::VALUE_REQUIRED), new InputOption('foo3', null, InputOption::VALUE_REQUIRED, '', 'default'), new InputOption('foo4', null, InputOption::VALUE_OPTIONAL), new InputOption('foo5', null, InputOption::VALUE_OPTIONAL, '', 'default'), new InputOption('foo6', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY), new InputOption('foo7', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, '', [1, 2]), ]); $defaults = [ 'foo1' => false, 'foo2' => null, 'foo3' => 'default', 'foo4' => null, 'foo5' => 'default', 'foo6' => [], 'foo7' => [1, 2], ]; $this->assertSame($defaults, $definition->getOptionDefaults(), '->getOptionDefaults() returns the default values for all options'); } /** * @dataProvider getGetSynopsisData */ public function testGetSynopsis(InputDefinition $definition, $expectedSynopsis, $message = null) { $this->assertEquals($expectedSynopsis, $definition->getSynopsis(), $message ? '->getSynopsis() '.$message : ''); } public function getGetSynopsisData() { return [ [new InputDefinition([new InputOption('foo')]), '[--foo]', 'puts optional options in square brackets'], [new InputDefinition([new InputOption('foo', 'f')]), '[-f|--foo]', 'separates shortcut with a pipe'], [new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)]), '[-f|--foo FOO]', 'uses shortcut as value placeholder'], [new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)]), '[-f|--foo [FOO]]', 'puts optional values in square brackets'], [new InputDefinition([new InputArgument('foo', InputArgument::REQUIRED)]), '<foo>', 'puts arguments in angle brackets'], [new InputDefinition([new InputArgument('foo')]), '[<foo>]', 'puts optional arguments in square brackets'], [new InputDefinition([new InputArgument('foo'), new InputArgument('bar')]), '[<foo> [<bar>]]', 'chains optional arguments inside brackets'], [new InputDefinition([new InputArgument('foo', InputArgument::IS_ARRAY)]), '[<foo>...]', 'uses an ellipsis for array arguments'], [new InputDefinition([new InputArgument('foo', InputArgument::REQUIRED | InputArgument::IS_ARRAY)]), '<foo>...', 'uses an ellipsis for required array arguments'], [new InputDefinition([new InputOption('foo'), new InputArgument('foo', InputArgument::REQUIRED)]), '[--foo] [--] <foo>', 'puts [--] between options and arguments'], ]; } public function testGetShortSynopsis() { $definition = new InputDefinition([new InputOption('foo'), new InputOption('bar'), new InputArgument('cat')]); $this->assertEquals('[options] [--] [<cat>]', $definition->getSynopsis(true), '->getSynopsis(true) groups options in [options]'); } protected function initializeArguments() { $this->foo = new InputArgument('foo'); $this->bar = new InputArgument('bar'); $this->foo1 = new InputArgument('foo'); $this->foo2 = new InputArgument('foo2', InputArgument::REQUIRED); } protected function initializeOptions() { $this->foo = new InputOption('foo', 'f'); $this->bar = new InputOption('bar', 'b'); $this->foo1 = new InputOption('fooBis', 'f'); $this->foo2 = new InputOption('foo', 'p'); $this->multi = new InputOption('multi', 'm|mm|mmm'); } }